package mysql

import (
	"github.com/gohouse/gorose"
	_ "github.com/gohouse/gorose/driver/mysql"
)

var DB *gorose.Connection

// DB Config.(Recommend to use configuration file to import)
var dbConfig = &gorose.DbConfigSingle{
	Driver:          "mysql", // driver: mysql/sqlite/oracle/mssql/postgres
	EnableQueryLog:  true,    // if enable sql logs
	SetMaxOpenConns: 0,       // connection pool of max Open connections, default zero
	SetMaxIdleConns: 0,       // connection pool of max sleep connections
	Prefix:          "",      // prefix of table
	Dsn:             "root:root@tcp(127.0.0.1:3306)/test?charset=utf8", // db dsn
}

//func init()  {
//	connection, err := gorose.Open(dbConfig)
//	if err != nil {
//		panic(err)
//	}
//	DB = connection
//}

